package com.park.service.impl.user;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.park.client.model.user.RoleModel;
import com.park.client.service.user.RoleService;
import com.park.dao.user.RoleMapper;
import com.park.service.impl.base.BaseServiceImpl;

@Service("roleService")
public class RoleServiceImpl extends BaseServiceImpl<RoleModel> implements RoleService{
	
	@Autowired
	private RoleMapper roleMapper;

	@Override
	public boolean insert(RoleModel record) {
		return roleMapper.insert(record) == 1;
	}
	@Override
	public boolean deleteByPrimaryKey(Long id) {
		return roleMapper.deleteByPrimaryKey(id)==1;
	}
	@Override
	public boolean insertSelective(RoleModel record) {
		return roleMapper.insertSelective(record)==1;
	}
	@Override
	public RoleModel selectByPrimaryKey(Long id) {
		return roleMapper.selectByPrimaryKey(id);
	}
	@Override
	public boolean updateByPrimaryKeySelective(RoleModel record) {
		return roleMapper.updateByPrimaryKeySelective(record)==1;
	}
	@Override
	public boolean updateByPrimaryKey(RoleModel record) {
		return roleMapper.updateByPrimaryKey(record)==1;
	}
	@Override
	public List<RoleModel> selectAll() {
		return roleMapper.selectAll();
	}
	@Override
	public List<RoleModel> selectPagination(RoleModel t) {
		return roleMapper.selectPagination(t);
	}
	@Override
	public Integer selectTotal(RoleModel t) {
		return roleMapper.selectTotal(t);
	}
	
}
